//============================================================================
// Name        : GNUT.cpp
// Author      : Jonathan Ellithorpe and Allen Lee
// Version     :
// Copyright   : UC Berkeley
// Description : GNUT's not UDP / TCP
//============================================================================

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Packet.h"

int main(void) {
	puts("Hi GNUT!");
	
	char* message = "WOOHAA!!";
	Packet p = Packet(0xFFFF, 0xFFFF, 0xFFFFFFFF, 0xFFFFFFFF, DAT, message, strlen(message)+1);
	
	printf("p.toBytes(): %s\n", p.toBytes());
	printf("srcPort: %d\n", p.getSrcPort());
	
	Packet p2 = Packet(p.toBytes(), p.getSize());
	
	printf("p2.toBytes(): %s\n", p2.toBytes());
	printf("srcPort: %d\n", p2.getSrcPort());
	printf("type: %d\n", p2.getType());
	
	
	
	p.freeBytes();
	
	p2.freeBytes();
	
	return EXIT_SUCCESS;
}
